function* makeGenerator() {
  yield 'hello'
  yield 'world'

  return 'ending'
}

var hw = new makeIterator()
console.log(hw.next())
console.log(hw.next())
console.log(hw.next())
console.log(hw.next())